//
//  DLStore.h
//  IpPrivacy
//
//  Created by 录音转文字助手 on 2020/8/21.
//  Copyright © 2020 录音转文字助手. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "XYIAPKit.h"
#import "WLAppleStore.h"


NS_ASSUME_NONNULL_BEGIN

@interface DLStore : NSObject
+ (instancetype) singletonMod;
//初始化数据
-(void)initData;
//获取善品列表
-(void)getComListSuccess:(void (^)(NSArray *products, NSArray *invalidProductIdentifiers))successBlock
                 failure:(void (^)(NSError *error))failureBlock;
/**
 @ 适用自动续期订阅
 判断是否已订阅
 若果是非自动续费型商品，直接返回NO
 @return YES：  NO：未订阅或者订阅过期
 */
-(BOOL)dl_isSubscribedWithAutoRenewProduct;

/**
 恢复购买
 */
-(void)dl_restoreTransactionsOnSuccess:(void (^)(NSArray *transactions))successBlock
                               failure:(void (^)(NSError *error))failureBlock;
/**
 购买服务
 */
-(void)dl_addPayment:(NSString *)paymentId
             success:(void (^)(SKPaymentTransaction *transaction))successBlock
             failure:(void (^)(SKPaymentTransaction *transaction, NSError *error))failureBlock;
@end

NS_ASSUME_NONNULL_END
